package routes

import (
	"ssr/handlers"
	"ssr/middleware"

	"github.com/gin-gonic/gin"
)

func JackpotRoutes(r *gin.Engine) {

	jackpotHandler := handlers.NewJackpotHandler()
	route := r.Group("/jackpot")
	route.Use(middleware.JwtMiddleware())
	{
		// 用户管理
		route.GET("/getJackpotGameUserInfo", jackpotHandler.GetJackpotUserInfo)
		route.POST("/getJackpotGameUserList", jackpotHandler.GetJackpotUserList)
		route.POST("/addJackpotUser", jackpotHandler.DisposeJackpotUser)
		route.POST("/deleteJackpotUser", jackpotHandler.DeleteJackpotUser)
		route.POST("/recharge", jackpotHandler.Recharge)
		// 游戏结果管理
		route.POST("/getGameResultList", jackpotHandler.GetGameResultList)
		route.POST("/addGameResult", jackpotHandler.AddGameResult)
		route.POST("/openGameResult", jackpotHandler.OpenGameResult)
		// 赔率值管理
		route.POST("/getOddRuleList", jackpotHandler.GetOddRuleList)
		route.POST("/disposeOddRule", jackpotHandler.DisposeOddRule)
		route.POST("/deleteOddRule", jackpotHandler.DeleteOddRule)

		// 投注
		route.POST("/bet", jackpotHandler.Bet)
	}
}
